export default function(money, digit) {
  var tpMoney = '0.00';
  if(undefined != money){
      tpMoney = money;
  }
  tpMoney = new Number(tpMoney);
  if(isNaN(tpMoney)){
    return '0.00';
  }
  tpMoney = tpMoney.toFixed(digit) + '';
  var re = /^(-?\d+)(\d{3})(\.?\d*)/;
  while(re.test(tpMoney)){
   tpMoney = tpMoney.replace(re, "$1,$2$3")
  }

  return tpMoney;
}
